this.BX=this.BX||{};this.BX.Mobile=this.BX.Mobile||{};this.BX.Mobile.Field=this.BX.Mobile.Field||{};(function(t,e){"use strict";var i=window.BX,n=window.BXMobileApp;var o=function(){var t=function t(e,n){this.node=e;this.container=n;this.nodeLink=this.node.previousElementSibling;this.click=i.delegate(this.click,this);this.callback=i.delegate(this.callback,this);i.bind(this.container,"click",this.click)};t.prototype={click:function t(e){if(e.toElement.tagName!=="A"){this.show();return i.PreventDefault(e)}},show:function t(){window.app.exec("showPostForm",{attachButton:{items:[]},attachFileSettings:{},attachedFiles:[],extraData:{},mentionButton:{},smileButton:{},message:{text:i.util.htmlspecialcharsback(this.nodeLink.value)},okButton:{callback:this.callback,name:e.Loc.getMessage("interface_form_save")},cancelButton:{callback:function t(){},name:e.Loc.getMessage("interface_form_cancel")}})},callback:function t(e){e.text=i.util.htmlspecialchars(e.text)||"";if(e.text===""){this.node.textContent=this.nodeLink.getAttribute("placeholder");this.node.setAttribute("href","#")}else{this.node.textContent=e.text;if(this.checkUrl(e.text)){this.node.setAttribute("href",e.text)}else{this.node.setAttribute("href","http://"+e.text)}}this.nodeLink.value=e.text;i.onCustomEvent(this,"onChange",[this,this.nodeLink])},checkUrl:function t(e){return/^(callto:|mailto:|https:\/\/|http:\/\/)/i.test(e)}};return t}();window.app.exec("enableCaptureKeyboard",true);i.Mobile.Field.Url=function(t){this.init(t)};i.Mobile.Field.Url.prototype={__proto__:i.Mobile.Field.prototype,bindElement:function t(e){var n=null;if(i(e)){n=new o(e,e.parentElement)}return n}}})(this.BX.Mobile.Field.Url=this.BX.Mobile.Field.Url||{},BX);
//# sourceMappingURL=mobile.map.js